/**
 * type 图片类型
 * imgId 图片组件当前选中imgID
 * imgUrl 图片组件当前选中imgurl
 */
const state = {
  type: "",
  imgId: "",
  imgUrl: "http://5b0988e595225.cdn.sohucs.com/images/20180626/f9d7c20596ce45d78b661c7d09d65e08.jpeg",
  ImgObj: {
    width: 375,
    height: 200,
    borderRadius: 20,
    url: "http://5b0988e595225.cdn.sohucs.com/images/20180626/f9d7c20596ce45d78b661c7d09d65e08.jpeg"
  }
};

const mutations = {
  SET_ImgObj: (state, ImgObj) => {
    state.ImgObj = ImgObj;
  },
  SET_TYPE: (state, type) => {
    state.type = type;
  },
  SET_IMGId: (state, imgid) => {
    state.imgId = imgid;
  },
  SET_IMGURL: (state, imgurl) => {
    state.ImgObj.url = imgurl;
    state.imgUrl = imgurl;
  }
};

export default {
  namespaced: true,
  state,
  mutations
};
